package Shape;

import javax.swing.*;
import java.awt.*;

public class test {
    public static void main(String[] args) {
//        JFrame frame = new JFrame();
//        frame.setSize(500,500);
//        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        ShapeManager shapeManager=new ShapeManager();
        Rectangle rect=new Rectangle(new Point(10,10),100,200);
        Triangle tri=new Triangle(new Point(0,10),new Point(50,50),new Point(150,0));
        Circle cir=new Circle(new Point(100,100),100);

//        System.out.println(rect.perimeter());
//        System.out.println(tri.perimeter());

        shapeManager.addShape(rect);
        shapeManager.addShape(tri);
        shapeManager.addShape(cir);
        shapeManager.drawShapes();
        shapeManager.delShape(rect);
        shapeManager.drawShapes();
//        JPanel panel = new JPanel() {
//            @Override
//            public void paint (Graphics g) {
////                rect.draw(g);
////                tri.draw(g);
////                cir.draw(g);
//                  shapeManager.drawShapes(g);
//            }
//        };
//        frame.add(panel);

//
//        frame.setVisible(true);

    }
}
